<?php
/**
 * Created by PhpStorm.
 * User: zrc
 * Date: 2018/3/26
 * Time: 11:28
 */

namespace App\Http\Controllers\Otc;



use App\Http\Controllers\Controller;
use App\Library\Yunxin;
use App\Traits\YunXinTrait;

class YnxinController extends Controller
{
    use YunXinTrait;

    public function test(){
        $a = $this->createUserIds(1,'测试1','','',123456,1);
        var_dump($a);
//        $y = new Yunxin\Yunxin();
//        $a = $y->test();
       // dump($a);
    }

    public function check_yx(){
        $model = new Yunxin\Yunxin();
        $arr = $model->check_yx(1);
        return $arr;
    }

    public function register_yx(){
        $id=2;
        $name='测试2';
        $img='www.baidu.com';
        $model = new Yunxin\Yunxin();
        $arr = $model->register_yx($id,$name,$img);
        return $arr;
    }

    public function send_yx_msg(){
        $id1=1;
        $id2=2;
        $msg1='测试1';
        $msg2='测试2';

//        $msg1=json_encode('测试1');
//        $msg2=json_encode('测试2');
        $model = new Yunxin\Yunxin();
        $arr = $model->send_yx_msg($id1,$id2,$msg1,$msg2);
        return $arr;
    }

    public function lock_yx_msg(){
        $model = new Yunxin\Yunxin();

        $arr = $model->lock_yx_msg();
        return $arr;

    }
    public function change_yx(){
        $model = new Yunxin\Yunxin();
        $arr = $model->change_yx(1,'哈哈','www.baidu.com');
        return $arr;

    }
}